<?php
if(!isset($_POST['loginUserID']) || !isset($_POST['loginPassword']) || !isset($_POST['loginDomain'])
	|| $_POST['loginUserID'] == '' || $_POST['loginPassword'] = '' || $_POST['loginDomain'] = '') {
	$user_valid = false;
} else {
	$user = $_POST['loginUserID'];
	$pass = $_POST['loginPassword'];
	$domain = $_POST['loginDomain'];
	$user_valid = true;
}

if($user_valid) {
	$result['success'] = true;
} else {
	$result['sucess'] = false;
	$result["errors"]["reason"] = "Login failed. Try again.";
}

echo json_encode($result);
?>
